I guess you changed the size of the sprite but didn't update the collision mask. You will need to do it since the game uses the sprite size to determine how many bytes of the mask to load - just export it, then resize it in a graphics program, change size in the tool and reimport when it shows the 'Invalid mask' error. The tool probably didn't finish writing and left you with a corrupted file that ends after the first write error, if the game managed to load that I would be quite suprised.
If that's not it, try to reproduce the write error you got since that's probably more significant.
|